package com.sharengo.sms;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "sms")
public class SmsProperties {
    private Wbs wbs = new Wbs();
    private Cmpp cmpp = new Cmpp();
    /**
     * 梦网短信接口的用户名
     */
    private String userId = "J25866";
    /**
     * 梦网短信接口的密码
     */
    private String password = "632107";
    /**
     * 多个号码相同内容接口的path
     */
    private String same_content_path = "/MWGate/wmgw.asmx/MongateSendSubmit";
    /**
     * 多个号码不同内容接口的path
     */
    private String diff_content_path = "/MWGate/wmgw.asmx/MongateMULTIXSend";

    private String pszSubPort = "*";

    /**
     * 选择发送的接口，默认是wbs,也可以选cmpp
     */
    private String protocol="wbs";

    /**
     * wbs接入方式 的ip,port配置
     */
    public static class Wbs {
        private String ip = "61.145.229.26";
        private int port = 8086;

        public String getIp() {
            return ip;
        }

        public void setIp(String ip) {
            this.ip = ip;
        }

        public int getPort() {
            return port;
        }

        public void setPort(int port) {
            this.port = port;
        }
    }



    /**
     * CMPP接入方式 的ip,port配置
     */
    public static class Cmpp {

        private String ip = "61.145.229.26";

        private int port = 7890;

        public String getIp() {
            return ip;
        }

        public void setIp(String ip) {
            this.ip = ip;
        }

        public int getPort() {
            return port;
        }

        public void setPort(int port) {
            this.port = port;
        }
    }

    public Cmpp getCmpp() {
        return cmpp;
    }

    public void setCmpp(Cmpp cmpp) {
        this.cmpp = cmpp;
    }

    public Wbs getWbs() {
        return wbs;
    }

    public void setWbs(Wbs wbs) {
        this.wbs = wbs;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSame_content_path() {
        return same_content_path;
    }

    public void setSame_content_path(String same_content_path) {
        this.same_content_path = same_content_path;
    }

    public String getDiff_content_path() {
        return diff_content_path;
    }

    public void setDiff_content_path(String diff_content_path) {
        this.diff_content_path = diff_content_path;
    }

    public String getPszSubPort() {
        return pszSubPort;
    }

    public void setPszSubPort(String pszSubPort) {
        this.pszSubPort = pszSubPort;
    }
}
